package com.txzhang.springcloud.storageservice.service;

import com.txzhang.springcloud.storageservice.config.Config;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(value = "order-server", configuration = Config.class)
public interface OrderService {

    /**
     *
     * @param userId 用户id
     * @param goodCode 商品code
     * @param count 购买数量
     */
    @PostMapping("/order/createOrder")
    void createOrder(@RequestParam("userId") Integer userId, @RequestParam("goodCode") String goodCode, @RequestParam("count") Integer count);
}
